let app = require("express")()
app.get('/nav', (req, res) => {
    res.header("Access-Control-Allow-Origin", "*")
    let menu = [{
            path: '/',
            // 这是官方推荐的方法使用ES的import,是路由懒加载
            component: "/components/Login.vue",
            hidden: true
        },
        {
            path: '/login',
            component: "/components/Login.vue",
            hidden: true
        },
        {
            path: '/home',
            name: '学生管理',
            redirect: '/home/student',
            iconClass: "fa fa-users",
            component: "/components/home.vue",
            children: [{
                    path: '/home/student',
                    name: '学生列表',
                    iconClass: "fa fa-list",
                    component: "/components/students/StudentList.vue",
                },
                {
                    path: '/home/info',
                    name: '信息列表',
                    iconClass: "fa fa-list-alt",
                    component: "/components/students/InfoList.vue",
                },
                {
                    path: '/home/infoment',
                    name: '信息管理',
                    iconClass: "fa fa-list-alt",
                    component: "/components/students/InfoMent.vue",
                },
                {
                    path: '/home/work',
                    name: '作业列表',
                    iconClass: "fa fa-list-ul",
                    component: "/components/students/WorkList.vue",
                },
                {
                    path: '/home/workment',
                    name: '作业管理',
                    iconClass: "fa fa-th-list",
                    component: "/components/students/WorkMent.vue",
                }
            ]
        },
        {
            path: '/home',
            name: '数据分析 ',
            iconClass: "fa fa-bar-chart",
            component: "/components/home.vue",
            children: [{
                    path: '/home/dataview',
                    name: '数据概览',
                    iconClass: "fa fa-line-chart",
                    component: "/components/dataAnalysis/DataView.vue",
                }, {
                    path: '/home/mapview',
                    name: '地图概览',
                    iconClass: "fa fa-list-alt",
                    component: "/components/dataAnalysis/MapView.vue",
                }, {
                    path: '/home/travel',
                    name: '旅游地图',
                    iconClass: "fa fa-list-alt",
                    component: "/components/dataAnalysis/TravelMap.vue",
                }, {
                    path: '/home/score',
                    name: '分数地图',
                    iconClass: "fa fa-list-ul",
                    component: "/components/dataAnalysis/ScoreMap.vue",
                },
                {
                    path: '/home/PianoKeyboardWithMusic',
                    name: "带音乐的钢琴键盘",
                    component: "/components/dataAnalysis/PianoKeyboardWithMusic.vue",
                }, {
                    path: '/home/WorldMap',
                    name: "世界地图",
                    component: "/components/dataAnalysis/WorldMap.vue",
                }
            ]
        },
    ]
    res.send(menu)
})
app.listen(3003, () => {
    console.log("app start at port http://localhost:3003");
})